package org.bigpigman.el.common;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @Description
 * @Author 朱咸军
 * @Date 2019/12/19
 **/
public class ThreadTool {

    private static final Logger log = LoggerFactory.getLogger(ThreadTool.class);

    public static String getCallInfo() {
        StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
        StackTraceElement ele = stackTrace[3];
        String className = ele.getClassName();
        String fileName = ele.getFileName();
        String methodName = ele.getMethodName();
        int lineNumber = ele.getLineNumber();
        return "{" + className + "." + methodName + "}\t\t" + fileName + "->" + lineNumber + "行\t\t";
    }

    public static void main(String[] args) {

    }

}
